What's New in HTML 4.0

New Elements in HTMLá4.0

The following elements are new in HTMLá4.0:

Separation of Structure and Presentation

By deprecating many presentational features from HTMLá3.2 and adding hooks for style sheets, HTMLá4.0 encourages separating a document's structure from its presentation. This concept is key to understanding HTMLá4.0.

When authors use HTML to markup a document's structure and style sheets to suggest the document's presentation, they can more easily achieve the device-independence that helped bring HTML its initial popularity. A document with a rich structure can be presented in many different ways on different media, allowing the document to adjust to new technologies such as phone or in-car aural browsers. The separation of content and presentation also allows authors to change the presentation of an entire site by editing a single style sheet, providing significant advantages in site maintenance.

Accessibility

Many of HTML 4.0's improvements in the area of accessibility follow from its emphasis on the separation of structure and presentation. When HTML is used structurally, a document can adapt to different browsing environments, accommodating large fonts, special colors, speech synthesizers, and Braille tactile feedback devices. This adaptability allows blind, low-vision, colorblind, and cognitively-challenged users access to the Web, opening a door for the world's 600 million disabled people.

HTML 4.0 includes many new elements and attributes aimed at improving the Web's accessibility. The multi-dimensional nature of HTML tables has long posed problems for non-visual browsing, but new attributes on the TABLE, TH, and TD elements allow table summaries and a more explicit association between a cell and its header information. These attributes give non-visual browsers the ability to render a cell's header information, possibly in an abbreviated form, before giving the cell's content.

New elements in HTML 4.0 also bring accessibility improvements to forms. The new FIELDSET element allows form controls to be grouped together and the LEGEND element provides a caption for the group. By grouping related form controls, authors allow those with non-visual browsers to more easily navigate complicated forms. As well, the new LABEL element associates a text label with a form control so that users can more easily determine what information is required in a given field.

Other accessibility improvements include full image descriptions through the LONGDESC attribute on the IMG element, rich alternatives to images and videos through the OBJECT element, and richer alternatives to image maps through a new content model for the MAP element.

Internationalization

To allow representation of the world's languages, HTMLá4.0 adopts the Universal Character Set as its character set. Previous versions of HTML were restricted to ISO-8859-1, a character set that only handled some western European languages. The Universal Character Set is character-by-character equivalent to Unicode 2.0 and contains characters for almost all of the world's languages.

The LANG and DIR attributes are new in HTMLá4.0 and apply to almost all elements. These attributes allow authors to specify the language and directionality of text. The BDO element allows authors to override the bidirectional algorithm used when right-to-left text such as Hebrew is presented.

HTML 4.0 also offers new entities for easy entry of mathematical symbols and Greek letters as well as other special characters.

Style Sheets

HTML 4.0 adds new hooks for style sheets, which suggest how a document is presented. The new ID, CLASS, and STYLE attributes allow style information to be attached to specific elements. The LINK and STYLE elements have new TYPE and MEDIA attributes for specifying the style sheet language and target media, respectively.

Client-side Scripting

HTML 4.0 embraces client-side scripting through the addition of a number of new attributes. The SCRIPT element now includes attributes for specifying the scripting language, embedding an external script, and deferring execution of a script. As well, a number of event attributes have been added to enable execution of a script upon events such as the user clicking an element, pressing a key, moving the mouse over an element, or changing the value of a form control.

The NOSCRIPT element, also new in HTMLá4.0, provides alternate content for browsers with client-side scripting disabled or not supported.

Frames

The inclusion of frames in HTMLá4.0 gives authors the ability to present multiple documents in one window. The frames model used in HTMLá4.0 is not changed from the flawed frames model originally proposed by Netscape.

Advanced Tables

The simple table model of HTMLá3.2 is expanded in HTMLá4.0 to include row and column groups, greater flexibility in defining a table's rules, and accessibility improvements. The use of row groups (THEAD, TFOOT, TBODY) allows visual browsers to render static header and footer rows with scrollable body rows, thus improving the readability of large tables.